#!/usr/bin/perl

use EBox;
use EBox::Config;
use EBox::Global;
use TryCatch;

EBox::init();

my $lockFile = EBox::Config::tmp() . 'ebox-software-lock';
my $software = EBox::Global->modInstance('software');
try {
   $software->_isModLocked();
} catch {
   if ( -e $lockFile ) {
      unlink($lockFile);
   }
   $software->st_unset('lockedBy');
   $software->st_unset('lockerPid');
}

1;
